add_executable(CybertronAgent "")

include_directories("${CYBERTRON_PATH_SOURCE}/CoreLibrary/include")
include_directories("${CYBERTRON_PATH_ROOT}/3rdparty/asio")
include_directories("${CYBERTRON_PATH_ROOT}/3rdparty")
include_directories("${CYBERTRON_PATH_ROOT}/3rdparty/gtest/include")
include_directories("${CYBERTRON_PATH_SOURCE}/Protocol/Output/cpp")

IF (WIN32)
	add_definitions(-D_WIN32_WINNT=0x0501)
ENDIF()

add_definitions(-DNOMINMAX)
add_definitions(-DUNICODE)
add_definitions(-D_UNICODE)
add_definitions(-D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)

file(GLOB_RECURSE srcs *.h *.hh *i *.hpp *.c *.cc *.cpp)
target_sources(CybertronAgent PRIVATE ${srcs})
source_group(Source FILES ${srcs})

SetDefaultTargetProperties(CybertronAgent)

target_link_libraries(CybertronAgent CybertronCore)

IF (MSVC)
target_link_libraries(CybertronAgent protobuf)
ELSEIF (UNIX)
target_link_libraries(CybertronAgent protobuf -luuid)
ENDIF()

IF (MSVC)
	SET_PROPERTY(TARGET CybertronAgent PROPERTY FOLDER "Commander")
ENDIF()
